package com.mangofactory.aop.aspects
{
	import com.mangofactory.aop.joinpoints.ProceedingJoinPoint;
	
	public class LoggingAspect implements Aspect
	{
		public function intercept(pointCut:ProceedingJoinPoint):void
		{
			trace(pointCut.targetMember.localName + " called with params: " + pointCut.arguments.join(","));
			pointCut.proceed();
			var returnValueString:String = pointCut.returnValue ? pointCut.returnValue.toString() : "null";
			trace(pointCut.targetMember.localName + " returned " + returnValueString );
		}
	}
}